<?php 
namespace Home\Controller;

class AboutController extends HomeController {
    public function index(){
        $id = I('get.id',2);
        $map['id'] = $id;
        if ($id=='' || !is_numeric($id)) {
            $this->error('Parameter error');
        }
        $list = M('Onepage')->where($map)->find();
        $this->assign('list',$list);
        $this->assign('id',$id);
        $this->display();
    }  
}